part of '../../repository.dart';

const _kWebPurchasedSubscriptionTransactionRegularOfferTypeValue = 'regular';

class _WebPurchasedSubscriptionTransactionOfferTypeDto extends Equatable {
  const _WebPurchasedSubscriptionTransactionOfferTypeDto._internal({
    required this.offerTypeString,
  });

  final String offerTypeString;

  @override
  List<Object?> get props {
    return [
      offerTypeString,
    ];
  }

  factory _WebPurchasedSubscriptionTransactionOfferTypeDto.fromString(String offerTypeString) {
    return _WebPurchasedSubscriptionTransactionOfferTypeDto._internal(
      offerTypeString: offerTypeString,
    );
  }

  WebPurchasedSubscriptionTransactionOfferType toEntity() {
    return switch (offerTypeString) {
      _kWebPurchasedSubscriptionTransactionRegularOfferTypeValue =>
        WebPurchasedSubscriptionTransactionOfferType.regular,
      _ => throw UnimplementedError(),
    };
  }
}
